package com.kgame5.xtank3d.app {
import com.kgame5.xtank3d.app.controll.StartupCommand;

import org.puremvc.as3.interfaces.IFacade;
import org.puremvc.as3.patterns.facade.Facade;

import flash.display.MovieClip;

/**
 * @author kk
 */
public class AppFacade extends Facade implements IFacade{
	
	public static function getInstance():AppFacade{
		if(instance==null){
			instance=new AppFacade();
		}
		return instance as AppFacade;
	}

	override protected function initializeController():void{
		
		super.initializeController();
		
		this.registerCommand(StartupCommand.NAME, StartupCommand);
		
		
	}
	
	//被外部调用，启动整个app
	public function startup(mc_root:MovieClip):void{
		//T.p("startUp");
		this.sendNotification(StartupCommand.NAME,mc_root);
	}
	
}//end of class
}
